﻿#region Header
//************************************************************************************
// Name: IDmsDao
// Description: Interface for DMS Dao
// Created On:  27-Dec-2011
// Created By:  Swathi
// Last Modified On:
// Last Modified By: 
// Last Modified Reason: 
//*************************************************************************************
#endregion Header
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Linq.Expressions;
using System.IO;


namespace Base.Common
{
    public interface IDmsDao
    {
        void CommitChanges();
        void Delete<T>(Expression<Func<T, bool>> expression) where T : class, new();
        void Delete<T>(T item) where T : class, new();
        void DeleteAll<T>() where T : class, new();
        T Single<T>(Expression<Func<T, bool>> expression) where T : class, new();
        System.Linq.IQueryable<T> All<T>() where T : class, new();
        void Add<T>(T item) where T : class, new();
        void Add<T>(IEnumerable<T> items) where T : class, new();
        void Update<T>(T item) where T : class, new();
        //string AddFile(Stream fs, string fileName);
        /// <summary>
        /// Retrives the files from specified directory
        /// </summary>
        /// <param name="dirPath"></param>
        /// <returns></returns>
        FileInfo[] GetFiles(string dirPath);
    }
}
